home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Sound / LAME / WarpOS / src / config.sub < prev    next >
Encoding:
Text File  |  2001-06-12  |  26.7 KB  |  1,351 lines

  1. #! /bin/sh
  2. # Configuration validation subroutine script.
  3. #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
  4. #   Free Software Foundation, Inc.
  5.  
  6. timestamp='2000-12-20'
  7.  
  8. # This file is (in principle) common to ALL GNU software.
  9. # The presence of a machine in this file suggests that SOME GNU software
  10. # can handle that machine.  It does not imply ALL GNU software can.
  11. #
  12. # This file is free software; you can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; either version 2 of the License, or
  15. # (at your option) any later version.
  16. #
  17. # This program is distributed in the hope that it will be useful,
  18. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20. # GNU General Public License for more details.
  21. #
  22. # You should have received a copy of the GNU General Public License
  23. # along with this program; if not, write to the Free Software
  24. # Foundation, Inc., 59 Temple Place - Suite 330,
  25. # Boston, MA 02111-1307, USA.
  26.  
  27. # As a special exception to the GNU General Public License, if you
  28. # distribute this file as part of a program that contains a
  29. # configuration script generated by Autoconf, you may include it under
  30. # the same distribution terms that you use for the rest of that program.
  31.  
  32. # Please send patches to <config-patches@gnu.org>.
  33. #
  34. # Configuration subroutine to validate and canonicalize a configuration type.
  35. # Supply the specified configuration type as an argument.
  36. # If it is invalid, we print an error message on stderr and exit with code 1.
  37. # Otherwise, we print the canonical config type on stdout and succeed.
  38.  
  39. # This file is supposed to be the same for all GNU packages
  40. # and recognize all the CPU types, system types and aliases
  41. # that are meaningful with *any* GNU software.
  42. # Each package is responsible for reporting which valid configurations
  43. # it does not support.  The user should be able to distinguish
  44. # a failure to support a valid configuration from a meaningless
  45. # configuration.
  46.  
  47. # The goal of this file is to map all the various variations of a given
  48. # machine specification into a single specification in the form:
  49. #    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  50. # or in some cases, the newer four-part form:
  51. #    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  52. # It is wrong to echo any other type of specification.
  53.  
  54. me=`echo "$0" | sed -e 's,.*/,,'`
  55.  
  56. usage="\
  57. Usage: $0 [OPTION] CPU-MFR-OPSYS
  58.        $0 [OPTION] ALIAS
  59.  
  60. Canonicalize a configuration name.
  61.  
  62. Operation modes:
  63.   -h, --help         print this help, then exit
  64.   -t, --time-stamp   print date of last modification, then exit
  65.   -v, --version      print version number, then exit
  66.  
  67. Report bugs and patches to <config-patches@gnu.org>."
  68.  
  69. version="\
  70. GNU config.sub ($timestamp)
  71.  
  72. Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
  73. Free Software Foundation, Inc.
  74.  
  75. This is free software; see the source for copying conditions.  There is NO
  76. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  77.  
  78. help="
  79. Try \`$me --help' for more information."
  80.  
  81. # Parse command line
  82. while test $# -gt 0 ; do
  83.   case $1 in
  84.     --time-stamp | --time* | -t )
  85.        echo "$timestamp" ; exit 0 ;;
  86.     --version | -v )
  87.        echo "$version" ; exit 0 ;;
  88.     --help | --h* | -h )
  89.        echo "$usage"; exit 0 ;;
  90.     -- )     # Stop option processing
  91.        shift; break ;;
  92.     - )    # Use stdin as input.
  93.        break ;;
  94.     -* )
  95.        echo "$me: invalid option $1$help"
  96.        exit 1 ;;
  97.  
  98.     *local*)
  99.        # First pass through any local machine types.
  100.        echo $1
  101.        exit 0;;
  102.  
  103.     * )
  104.        break ;;
  105.   esac
  106. done
  107.  
  108. case $# in
  109.  0) echo "$me: missing argument$help" >&2
  110.     exit 1;;
  111.  1) ;;
  112.  *) echo "$me: too many arguments$help" >&2
  113.     exit 1;;
  114. esac
  115.  
  116. # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
  117. # Here we must recognize all the valid KERNEL-OS combinations.
  118. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  119. case $maybe_os in
  120.   nto-qnx* | linux-gnu* | storm-chaos*)
  121.     os=-$maybe_os
  122.     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  123.     ;;
  124.   *)
  125.     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  126.     if [ $basic_machine != $1 ]
  127.     then os=`echo $1 | sed 's/.*-/-/'`
  128.     else os=; fi
  129.     ;;
  130. esac
  131.  
  132. ### Let's recognize common machines as not being operating systems so
  133. ### that things like config.sub decstation-3100 work.  We also
  134. ### recognize some manufacturers as not being operating systems, so we
  135. ### can provide default operating systems below.
  136. case $os in
  137.     -sun*os*)
  138.         # Prevent following clause from handling this invalid input.
  139.         ;;
  140.     -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  141.     -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  142.     -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
  143.     -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  144.     -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  145.     -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  146.     -apple | -axis)
  147.         os=
  148.         basic_machine=$1
  149.         ;;
  150.     -sim | -cisco | -oki | -wec | -winbond)
  151.         os=
  152.         basic_machine=$1
  153.         ;;
  154.     -scout)
  155.         ;;
  156.     -wrs)
  157.         os=-vxworks
  158.         basic_machine=$1
  159.         ;;
  160.     -hiux*)
  161.         os=-hiuxwe2
  162.         ;;
  163.     -sco5)
  164.         os=-sco3.2v5
  165.         basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  166.         ;;
  167.     -sco4)
  168.         os=-sco3.2v4
  169.         basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  170.         ;;
  171.     -sco3.2.[4-9]*)
  172.         os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  173.         basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  174.         ;;
  175.     -sco3.2v[4-9]*)
  176.         # Don't forget version if it is 3.2v4 or newer.
  177.         basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  178.         ;;
  179.     -sco*)
  180.         os=-sco3.2v2
  181.         basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  182.         ;;
  183.     -udk*)
  184.         basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  185.         ;;
  186.     -isc)
  187.         os=-isc2.2
  188.         basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  189.         ;;
  190.     -clix*)
  191.         basic_machine=clipper-intergraph
  192.         ;;
  193.     -isc*)
  194.         basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  195.         ;;
  196.     -lynx*)
  197.         os=-lynxos
  198.         ;;
  199.     -ptx*)
  200.         basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  201.         ;;
  202.     -windowsnt*)
  203.         os=`echo $os | sed -e 's/windowsnt/winnt/'`
  204.         ;;
  205.     -psos*)
  206.         os=-psos
  207.         ;;
  208.     -mint | -mint[0-9]*)
  209.         basic_machine=m68k-atari
  210.         os=-mint
  211.         ;;
  212. esac
  213.  
  214. # Decode aliases for certain CPU-COMPANY combinations.
  215. case $basic_machine in
  216.     # Recognize the basic CPU types without company name.
  217.     # Some are omitted here because they have special meanings below.
  218.     tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
  219.             | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
  220.         | pyramid | mn10200 | mn10300 | tron | a29k \
  221.         | 580 | i960 | h8300 \
  222.         | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
  223.         | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
  224.         | hppa64 \
  225.         | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
  226.         | alphaev6[78] \
  227.         | we32k | ns16k | clipper | i370 | sh | sh[34] \
  228.         | powerpc | powerpcle \
  229.         | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
  230.         | mips64orion | mips64orionel | mipstx39 | mipstx39el \
  231.         | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
  232.         | mips64vr5000 | miprs64vr5000el | mcore \
  233.         | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
  234.         | thumb | d10v | d30v | fr30 | avr)
  235.         basic_machine=$basic_machine-unknown
  236.         ;;
  237.     m6811 | m68hc11 | m6812 | m68hc12)
  238.         # Motorola 68HC11/12.
  239.         basic_machine=$basic_machine-unknown
  240.         os=-none
  241.         ;;
  242.     m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
  243.         ;;
  244.  
  245.     # We use `pc' rather than `unknown'
  246.     # because (1) that's what they normally are, and
  247.     # (2) the word "unknown" tends to confuse beginning users.
  248.     i[234567]86 | x86_64)
  249.       basic_machine=$basic_machine-pc
  250.       ;;
  251.     # Object if more than one company name word.
  252.     *-*-*)
  253.         echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  254.         exit 1
  255.         ;;
  256.     # Recognize the basic CPU types with company name.
  257.     # FIXME: clean up the formatting here.
  258.     vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
  259.           | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
  260.           | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
  261.           | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  262.           | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
  263.           | xmp-* | ymp-* \
  264.           | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
  265.           | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
  266.           | hppa2.0n-* | hppa64-* \
  267.           | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
  268.           | alphaev6[78]-* \
  269.           | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
  270.           | clipper-* | orion-* \
  271.           | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
  272.           | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
  273.           | mips64el-* | mips64orion-* | mips64orionel-* \
  274.           | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
  275.           | mipstx39-* | mipstx39el-* | mcore-* \
  276.           | f30[01]-* | f700-* | s390-* | sv1-* | t3e-* \
  277.           | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
  278.           | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
  279.           | bs2000-* | tic54x-* | c54x-* | x86_64-*)
  280.         ;;
  281.     # Recognize the various machine names and aliases which stand
  282.     # for a CPU type and a company and sometimes even an OS.
  283.     386bsd)
  284.         basic_machine=i386-unknown
  285.         os=-bsd
  286.         ;;
  287.     3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  288.         basic_machine=m68000-att
  289.         ;;
  290.     3b*)
  291.         basic_machine=we32k-att
  292.         ;;
  293.     a29khif)
  294.         basic_machine=a29k-amd
  295.         os=-udi
  296.         ;;
  297.     adobe68k)
  298.         basic_machine=m68010-adobe
  299.         os=-scout
  300.         ;;
  301.     alliant | fx80)
  302.         basic_machine=fx80-alliant
  303.         ;;
  304.     altos | altos3068)
  305.         basic_machine=m68k-altos
  306.         ;;
  307.     am29k)
  308.         basic_machine=a29k-none
  309.         os=-bsd
  310.         ;;
  311.     amdahl)
  312.         basic_machine=580-amdahl
  313.         os=-sysv
  314.         ;;
  315.     amiga | amiga-*)
  316.         basic_machine=m68k-unknown
  317.         ;;
  318.     amigaos | amigados)
  319.         basic_machine=m68k-unknown
  320.         os=-amigaos
  321.         ;;
  322.     amigaunix | amix)
  323.         basic_machine=m68k-unknown
  324.         os=-sysv4
  325.         ;;
  326.     apollo68)
  327.         basic_machine=m68k-apollo
  328.         os=-sysv
  329.         ;;
  330.     apollo68bsd)
  331.         basic_machine=m68k-apollo
  332.         os=-bsd
  333.         ;;
  334.     aux)
  335.         basic_machine=m68k-apple
  336.         os=-aux
  337.         ;;
  338.     balance)
  339.         basic_machine=ns32k-sequent
  340.         os=-dynix
  341.         ;;
  342.     convex-c1)
  343.         basic_machine=c1-convex
  344.         os=-bsd
  345.         ;;
  346.     convex-c2)
  347.         basic_machine=c2-convex
  348.         os=-bsd
  349.         ;;
  350.     convex-c32)
  351.         basic_machine=c32-convex
  352.         os=-bsd
  353.         ;;
  354.     convex-c34)
  355.         basic_machine=c34-convex
  356.         os=-bsd
  357.         ;;
  358.     convex-c38)
  359.         basic_machine=c38-convex
  360.         os=-bsd
  361.         ;;
  362.     cray | ymp)
  363.         basic_machine=ymp-cray
  364.         os=-unicos
  365.         ;;
  366.     cray2)
  367.         basic_machine=cray2-cray
  368.         os=-unicos
  369.         ;;
  370.     [ctj]90-cray)
  371.         basic_machine=c90-cray
  372.         os=-unicos
  373.         ;;
  374.     crds | unos)
  375.         basic_machine=m68k-crds
  376.         ;;
  377.     cris | cris-* | etrax*)
  378.         basic_machine=cris-axis
  379.         ;;
  380.     da30 | da30-*)
  381.         basic_machine=m68k-da30
  382.         ;;
  383.     decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  384.         basic_machine=mips-dec
  385.         ;;
  386.     delta | 3300 | motorola-3300 | motorola-delta \
  387.           | 3300-motorola | delta-motorola)
  388.         basic_machine=m68k-motorola
  389.         ;;
  390.     delta88)
  391.         basic_machine=m88k-motorola
  392.         os=-sysv3
  393.         ;;
  394.     dpx20 | dpx20-*)
  395.         basic_machine=rs6000-bull
  396.         os=-bosx
  397.         ;;
  398.     dpx2* | dpx2*-bull)
  399.         basic_machine=m68k-bull
  400.         os=-sysv3
  401.         ;;
  402.     ebmon29k)
  403.         basic_machine=a29k-amd
  404.         os=-ebmon
  405.         ;;
  406.     elxsi)
  407.         basic_machine=elxsi-elxsi
  408.         os=-bsd
  409.         ;;
  410.     encore | umax | mmax)
  411.         basic_machine=ns32k-encore
  412.         ;;
  413.     es1800 | OSE68k | ose68k | ose | OSE)
  414.         basic_machine=m68k-ericsson
  415.         os=-ose
  416.         ;;
  417.     fx2800)
  418.         basic_machine=i860-alliant
  419.         ;;
  420.     genix)
  421.         basic_machine=ns32k-ns
  422.         ;;
  423.     gmicro)
  424.         basic_machine=tron-gmicro
  425.         os=-sysv
  426.         ;;
  427.     h3050r* | hiux*)
  428.         basic_machine=hppa1.1-hitachi
  429.         os=-hiuxwe2
  430.         ;;
  431.     h8300hms)
  432.         basic_machine=h8300-hitachi
  433.         os=-hms
  434.         ;;
  435.     h8300xray)
  436.         basic_machine=h8300-hitachi
  437.         os=-xray
  438.         ;;
  439.     h8500hms)
  440.         basic_machine=h8500-hitachi
  441.         os=-hms
  442.         ;;
  443.     harris)
  444.         basic_machine=m88k-harris
  445.         os=-sysv3
  446.         ;;
  447.     hp300-*)
  448.         basic_machine=m68k-hp
  449.         ;;
  450.     hp300bsd)
  451.         basic_machine=m68k-hp
  452.         os=-bsd
  453.         ;;
  454.     hp300hpux)
  455.         basic_machine=m68k-hp
  456.         os=-hpux
  457.         ;;
  458.     hp3k9[0-9][0-9] | hp9[0-9][0-9])
  459.         basic_machine=hppa1.0-hp
  460.         ;;
  461.     hp9k2[0-9][0-9] | hp9k31[0-9])
  462.         basic_machine=m68000-hp
  463.         ;;
  464.     hp9k3[2-9][0-9])
  465.         basic_machine=m68k-hp
  466.         ;;
  467.     hp9k6[0-9][0-9] | hp6[0-9][0-9])
  468.         basic_machine=hppa1.0-hp
  469.         ;;
  470.     hp9k7[0-79][0-9] | hp7[0-79][0-9])
  471.         basic_machine=hppa1.1-hp
  472.         ;;
  473.     hp9k78[0-9] | hp78[0-9])
  474.         # FIXME: really hppa2.0-hp
  475.         basic_machine=hppa1.1-hp
  476.         ;;
  477.     hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  478.         # FIXME: really hppa2.0-hp
  479.         basic_machine=hppa1.1-hp
  480.         ;;
  481.     hp9k8[0-9][13679] | hp8[0-9][13679])
  482.         basic_machine=hppa1.1-hp
  483.         ;;
  484.     hp9k8[0-9][0-9] | hp8[0-9][0-9])
  485.         basic_machine=hppa1.0-hp
  486.         ;;
  487.     hppa-next)
  488.         os=-nextstep3
  489.         ;;
  490.     hppaosf)
  491.         basic_machine=hppa1.1-hp
  492.         os=-osf
  493.         ;;
  494.     hppro)
  495.         basic_machine=hppa1.1-hp
  496.         os=-proelf
  497.         ;;
  498.     i370-ibm* | ibm*)
  499.         basic_machine=i370-ibm
  500.         ;;
  501. # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
  502.     i[34567]86v32)
  503.         basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  504.         os=-sysv32
  505.         ;;
  506.     i[34567]86v4*)
  507.         basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  508.         os=-sysv4
  509.         ;;
  510.     i[34567]86v)
  511.         basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  512.         os=-sysv
  513.         ;;
  514.     i[34567]86sol2)
  515.         basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  516.         os=-solaris2
  517.         ;;
  518.     i386mach)
  519.         basic_machine=i386-mach
  520.         os=-mach
  521.         ;;
  522.     i386-vsta | vsta)
  523.         basic_machine=i386-unknown
  524.         os=-vsta
  525.         ;;
  526.     i386-go32 | go32)
  527.         basic_machine=i386-unknown
  528.         os=-go32
  529.         ;;
  530.     i386-mingw32 | mingw32)
  531.         basic_machine=i386-unknown
  532.         os=-mingw32
  533.         ;;
  534.     i[34567]86-pw32 | pw32)
  535.         basic_machine=i586-unknown
  536.         os=-pw32
  537.         ;;
  538.     iris | iris4d)
  539.         basic_machine=mips-sgi
  540.         case $os in
  541.             -irix*)
  542.             ;;
  543.             *)
  544.             os=-irix4
  545.             ;;
  546.         esac
  547.         ;;
  548.     isi68 | isi)
  549.         basic_machine=m68k-isi
  550.         os=-sysv
  551.         ;;
  552.     m88k-omron*)
  553.         basic_machine=m88k-omron
  554.         ;;
  555.     magnum | m3230)
  556.         basic_machine=mips-mips
  557.         os=-sysv
  558.         ;;
  559.     merlin)
  560.         basic_machine=ns32k-utek
  561.         os=-sysv
  562.         ;;
  563.     miniframe)
  564.         basic_machine=m68000-convergent
  565.         ;;
  566.     *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  567.         basic_machine=m68k-atari
  568.         os=-mint
  569.         ;;
  570.     mipsel*-linux*)
  571.         basic_machine=mipsel-unknown
  572.         os=-linux-gnu
  573.         ;;
  574.     mips*-linux*)
  575.         basic_machine=mips-unknown
  576.         os=-linux-gnu
  577.         ;;
  578.     mips3*-*)
  579.         basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  580.         ;;
  581.     mips3*)
  582.         basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  583.         ;;
  584.     mmix*)
  585.         basic_machine=mmix-knuth
  586.         os=-mmixware
  587.         ;;
  588.     monitor)
  589.         basic_machine=m68k-rom68k
  590.         os=-coff
  591.         ;;
  592.     morphos)
  593.         basic_machine=powerpc-unknown
  594.         os=-morphos
  595.         ;;
  596.     msdos)
  597.         basic_machine=i386-unknown
  598.         os=-msdos
  599.         ;;
  600.     mvs)
  601.         basic_machine=i370-ibm
  602.         os=-mvs
  603.         ;;
  604.     ncr3000)
  605.         basic_machine=i486-ncr
  606.         os=-sysv4
  607.         ;;
  608.     netbsd386)
  609.         basic_machine=i386-unknown
  610.         os=-netbsd
  611.         ;;
  612.     netwinder)
  613.         basic_machine=armv4l-rebel
  614.         os=-linux
  615.         ;;
  616.     news | news700 | news800 | news900)
  617.         basic_machine=m68k-sony
  618.         os=-newsos
  619.         ;;
  620.     news1000)
  621.         basic_machine=m68030-sony
  622.         os=-newsos
  623.         ;;
  624.     news-3600 | risc-news)
  625.         basic_machine=mips-sony
  626.         os=-newsos
  627.         ;;
  628.     necv70)
  629.         basic_machine=v70-nec
  630.         os=-sysv
  631.         ;;
  632.     next | m*-next )
  633.         basic_machine=m68k-next
  634.         case $os in
  635.             -nextstep* )
  636.             ;;
  637.             -ns2*)
  638.               os=-nextstep2
  639.             ;;
  640.             *)
  641.               os=-nextstep3
  642.             ;;
  643.         esac
  644.         ;;
  645.     nh3000)
  646.         basic_machine=m68k-harris
  647.         os=-cxux
  648.         ;;
  649.     nh[45]000)
  650.         basic_machine=m88k-harris
  651.         os=-cxux
  652.         ;;
  653.     nindy960)
  654.         basic_machine=i960-intel
  655.         os=-nindy
  656.         ;;
  657.     mon960)
  658.         basic_machine=i960-intel
  659.         os=-mon960
  660.         ;;
  661.     nonstopux)
  662.         basic_machine=mips-compaq
  663.         os=-nonstopux
  664.         ;;
  665.     np1)
  666.         basic_machine=np1-gould
  667.         ;;
  668.     nsr-tandem)
  669.         basic_machine=nsr-tandem
  670.         ;;
  671.     op50n-* | op60c-*)
  672.         basic_machine=hppa1.1-oki
  673.         os=-proelf
  674.         ;;
  675.     OSE68000 | ose68000)
  676.         basic_machine=m68000-ericsson
  677.         os=-ose
  678.         ;;
  679.     os68k)
  680.         basic_machine=m68k-none
  681.         os=-os68k
  682.         ;;
  683.     pa-hitachi)
  684.         basic_machine=hppa1.1-hitachi
  685.         os=-hiuxwe2
  686.         ;;
  687.     paragon)
  688.         basic_machine=i860-intel
  689.         os=-osf
  690.         ;;
  691.     pbd)
  692.         basic_machine=sparc-tti
  693.         ;;
  694.     pbb)
  695.         basic_machine=m68k-tti
  696.         ;;
  697.         pc532 | pc532-*)
  698.         basic_machine=ns32k-pc532
  699.         ;;
  700.     pentium | p5 | k5 | k6 | nexgen)
  701.         basic_machine=i586-pc
  702.         ;;
  703.     pentiumpro | p6 | 6x86 | athlon)
  704.         basic_machine=i686-pc
  705.         ;;
  706.     pentiumii | pentium2)
  707.         basic_machine=i686-pc
  708.         ;;
  709.     pentium-* | p5-* | k5-* | k6-* | nexgen-*)
  710.         basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  711.         ;;
  712.     pentiumpro-* | p6-* | 6x86-* | athlon-*)
  713.         basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  714.         ;;
  715.     pentiumii-* | pentium2-*)
  716.         basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  717.         ;;
  718.     pn)
  719.         basic_machine=pn-gould
  720.         ;;
  721.     power)    basic_machine=power-ibm
  722.         ;;
  723.     ppc)    basic_machine=powerpc-unknown
  724.             ;;
  725.     ppc-*)    basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  726.         ;;
  727.     ppcle | powerpclittle | ppc-le | powerpc-little)
  728.         basic_machine=powerpcle-unknown
  729.             ;;
  730.     ppcle-* | powerpclittle-*)
  731.         basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  732.         ;;
  733.     ps2)
  734.         basic_machine=i386-ibm
  735.         ;;
  736.     rom68k)
  737.         basic_machine=m68k-rom68k
  738.         os=-coff
  739.         ;;
  740.     rm[46]00)
  741.         basic_machine=mips-siemens
  742.         ;;
  743.     rtpc | rtpc-*)
  744.         basic_machine=romp-ibm
  745.         ;;
  746.     sa29200)
  747.         basic_machine=a29k-amd
  748.         os=-udi
  749.         ;;
  750.     sequent)
  751.         basic_machine=i386-sequent
  752.         ;;
  753.     sh)
  754.         basic_machine=sh-hitachi
  755.         os=-hms
  756.         ;;
  757.     sparclite-wrs)
  758.         basic_machine=sparclite-wrs
  759.         os=-vxworks
  760.         ;;
  761.     sps7)
  762.         basic_machine=m68k-bull
  763.         os=-sysv2
  764.         ;;
  765.     spur)
  766.         basic_machine=spur-unknown
  767.         ;;
  768.     st2000)
  769.         basic_machine=m68k-tandem
  770.         ;;
  771.     stratus)
  772.         basic_machine=i860-stratus
  773.         os=-sysv4
  774.         ;;
  775.     sun2)
  776.         basic_machine=m68000-sun
  777.         ;;
  778.     sun2os3)
  779.         basic_machine=m68000-sun
  780.         os=-sunos3
  781.         ;;
  782.     sun2os4)
  783.         basic_machine=m68000-sun
  784.         os=-sunos4
  785.         ;;
  786.     sun3os3)
  787.         basic_machine=m68k-sun
  788.         os=-sunos3
  789.         ;;
  790.     sun3os4)
  791.         basic_machine=m68k-sun
  792.         os=-sunos4
  793.         ;;
  794.     sun4os3)
  795.         basic_machine=sparc-sun
  796.         os=-sunos3
  797.         ;;
  798.     sun4os4)
  799.         basic_machine=sparc-sun
  800.         os=-sunos4
  801.         ;;
  802.     sun4sol2)
  803.         basic_machine=sparc-sun
  804.         os=-solaris2
  805.         ;;
  806.     sun3 | sun3-*)
  807.         basic_machine=m68k-sun
  808.         ;;
  809.     sun4)
  810.         basic_machine=sparc-sun
  811.         ;;
  812.     sun386 | sun386i | roadrunner)
  813.         basic_machine=i386-sun
  814.         ;;
  815.     sv1)
  816.         basic_machine=sv1-cray
  817.         os=-unicos
  818.         ;;
  819.     symmetry)
  820.         basic_machine=i386-sequent
  821.         os=-dynix
  822.         ;;
  823.     t3e)
  824.         basic_machine=t3e-cray
  825.         os=-unicos
  826.         ;;
  827.     tic54x | c54x*)
  828.         basic_machine=tic54x-unknown
  829.         os=-coff
  830.         ;;
  831.     tx39)
  832.         basic_machine=mipstx39-unknown
  833.         ;;
  834.     tx39el)
  835.         basic_machine=mipstx39el-unknown
  836.         ;;
  837.     tower | tower-32)
  838.         basic_machine=m68k-ncr
  839.         ;;
  840.     udi29k)
  841.         basic_machine=a29k-amd
  842.         os=-udi
  843.         ;;
  844.     ultra3)
  845.         basic_machine=a29k-nyu
  846.         os=-sym1
  847.         ;;
  848.     v810 | necv810)
  849.         basic_machine=v810-nec
  850.         os=-none
  851.         ;;
  852.     vaxv)
  853.         basic_machine=vax-dec
  854.         os=-sysv
  855.         ;;
  856.     vms)
  857.         basic_machine=vax-dec
  858.         os=-vms
  859.         ;;
  860.     vpp*|vx|vx-*)
  861.                basic_machine=f301-fujitsu
  862.                ;;
  863.     vxworks960)
  864.         basic_machine=i960-wrs
  865.         os=-vxworks
  866.         ;;
  867.     vxworks68)
  868.         basic_machine=m68k-wrs
  869.         os=-vxworks
  870.         ;;
  871.     vxworks29k)
  872.         basic_machine=a29k-wrs
  873.         os=-vxworks
  874.         ;;
  875.     w65*)
  876.         basic_machine=w65-wdc
  877.         os=-none
  878.         ;;
  879.     w89k-*)
  880.         basic_machine=hppa1.1-winbond
  881.         os=-proelf
  882.         ;;
  883.     xmp)
  884.         basic_machine=xmp-cray
  885.         os=-unicos
  886.         ;;
  887.         xps | xps100)
  888.         basic_machine=xps100-honeywell
  889.         ;;
  890.     z8k-*-coff)
  891.         basic_machine=z8k-unknown
  892.         os=-sim
  893.         ;;
  894.     none)
  895.         basic_machine=none-none
  896.         os=-none
  897.         ;;
  898.  
  899. # Here we handle the default manufacturer of certain CPU types.  It is in
  900. # some cases the only manufacturer, in others, it is the most popular.
  901.     w89k)
  902.         basic_machine=hppa1.1-winbond
  903.         ;;
  904.     op50n)
  905.         basic_machine=hppa1.1-oki
  906.         ;;
  907.     op60c)
  908.         basic_machine=hppa1.1-oki
  909.         ;;
  910.     mips)
  911.         if [ x$os = x-linux-gnu ]; then
  912.             basic_machine=mips-unknown
  913.         else
  914.             basic_machine=mips-mips
  915.         fi
  916.         ;;
  917.     romp)
  918.         basic_machine=romp-ibm
  919.         ;;
  920.     rs6000)
  921.         basic_machine=rs6000-ibm
  922.         ;;
  923.     vax)
  924.         basic_machine=vax-dec
  925.         ;;
  926.     pdp11)
  927.         basic_machine=pdp11-dec
  928.         ;;
  929.     we32k)
  930.         basic_machine=we32k-att
  931.         ;;
  932.     sh3 | sh4)
  933.         basic_machine=sh-unknown
  934.         ;;
  935.     sparc | sparcv9)
  936.         basic_machine=sparc-sun
  937.         ;;
  938.         cydra)
  939.         basic_machine=cydra-cydrome
  940.         ;;
  941.     orion)
  942.         basic_machine=orion-highlevel
  943.         ;;
  944.     orion105)
  945.         basic_machine=clipper-highlevel
  946.         ;;
  947.     mac | mpw | mac-mpw)
  948.         basic_machine=m68k-apple
  949.         ;;
  950.     pmac | pmac-mpw)
  951.         basic_machine=powerpc-apple
  952.         ;;
  953.     c4x*)
  954.         basic_machine=c4x-none
  955.         os=-coff
  956.         ;;
  957.     *)
  958.         echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  959.         exit 1
  960.         ;;
  961. esac
  962.  
  963. # Here we canonicalize certain aliases for manufacturers.
  964. case $basic_machine in
  965.     *-digital*)
  966.         basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  967.         ;;
  968.     *-commodore*)
  969.         basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  970.         ;;
  971.     *)
  972.         ;;
  973. esac
  974.  
  975. # Decode manufacturer-specific aliases for certain operating systems.
  976.  
  977. if [ x"$os" != x"" ]
  978. then
  979. case $os in
  980.         # First match some system type aliases
  981.         # that might get confused with valid system types.
  982.     # -solaris* is a basic system type, with this one exception.
  983.     -solaris1 | -solaris1.*)
  984.         os=`echo $os | sed -e 's|solaris1|sunos4|'`
  985.         ;;
  986.     -solaris)
  987.         os=-solaris2
  988.         ;;
  989.     -svr4*)
  990.         os=-sysv4
  991.         ;;
  992.     -unixware*)
  993.         os=-sysv4.2uw
  994.         ;;
  995.     -gnu/linux*)
  996.         os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  997.         ;;
  998.     # First accept the basic system types.
  999.     # The portable systems comes first.
  1000.     # Each alternative MUST END IN A *, to match a version number.
  1001.     # -sysv* is not here because it comes later, after sysvr4.
  1002.     -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  1003.           | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  1004.           | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  1005.           | -amigaos* | -amigados* | -morphos* | -msdos* | -newsos* | -unicos* | -aof* \
  1006.           | -aos* \
  1007.           | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1008.           | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1009.           | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
  1010.           | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1011.           | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1012.           | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1013.           | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1014.           | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  1015.           | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
  1016.           | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* | -storm-chaos*)
  1017.     # Remember, each alternative MUST END IN *, to match a version number.
  1018.         ;;
  1019.     -qnx*)
  1020.         case $basic_machine in
  1021.             x86-* | i[34567]86-*)
  1022.             ;;
  1023.             *)
  1024.             os=-nto$os
  1025.             ;;
  1026.         esac
  1027.         ;;
  1028.     -nto*)
  1029.         os=-nto-qnx
  1030.         ;;
  1031.     -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  1032.           | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
  1033.           | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  1034.         ;;
  1035.     -mac*)
  1036.         os=`echo $os | sed -e 's|mac|macos|'`
  1037.         ;;
  1038.     -linux*)
  1039.         os=`echo $os | sed -e 's|linux|linux-gnu|'`
  1040.         ;;
  1041.     -sunos5*)
  1042.         os=`echo $os | sed -e 's|sunos5|solaris2|'`
  1043.         ;;
  1044.     -sunos6*)
  1045.         os=`echo $os | sed -e 's|sunos6|solaris3|'`
  1046.         ;;
  1047.     -opened*)
  1048.         os=-openedition
  1049.         ;;
  1050.     -wince*)
  1051.         os=-wince
  1052.         ;;
  1053.     -osfrose*)
  1054.         os=-osfrose
  1055.         ;;
  1056.     -osf*)
  1057.         os=-osf
  1058.         ;;
  1059.     -utek*)
  1060.         os=-bsd
  1061.         ;;
  1062.     -dynix*)
  1063.         os=-bsd
  1064.         ;;
  1065.     -acis*)
  1066.         os=-aos
  1067.         ;;
  1068.     -386bsd)
  1069.         os=-bsd
  1070.         ;;
  1071.     -ctix* | -uts*)
  1072.         os=-sysv
  1073.         ;;
  1074.     -ns2 )
  1075.             os=-nextstep2
  1076.         ;;
  1077.     -nsk*)
  1078.         os=-nsk
  1079.         ;;
  1080.     # Preserve the version number of sinix5.
  1081.     -sinix5.*)
  1082.         os=`echo $os | sed -e 's|sinix|sysv|'`
  1083.         ;;
  1084.     -sinix*)
  1085.         os=-sysv4
  1086.         ;;
  1087.     -triton*)
  1088.         os=-sysv3
  1089.         ;;
  1090.     -oss*)
  1091.         os=-sysv3
  1092.         ;;
  1093.     -svr4)
  1094.         os=-sysv4
  1095.         ;;
  1096.     -svr3)
  1097.         os=-sysv3
  1098.         ;;
  1099.     -sysvr4)
  1100.         os=-sysv4
  1101.         ;;
  1102.     # This must come after -sysvr4.
  1103.     -sysv*)
  1104.         ;;
  1105.     -ose*)
  1106.         os=-ose
  1107.         ;;
  1108.     -es1800*)
  1109.         os=-ose
  1110.         ;;
  1111.     -xenix)
  1112.         os=-xenix
  1113.         ;;
  1114.         -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1115.             os=-mint
  1116.         ;;
  1117.     -none)
  1118.         ;;
  1119.     *)
  1120.         # Get rid of the `-' at the beginning of $os.
  1121.         os=`echo $os | sed 's/[^-]*-//'`
  1122.         echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  1123.         exit 1
  1124.         ;;
  1125. esac
  1126. else
  1127.  
  1128. # Here we handle the default operating systems that come with various machines.
  1129. # The value should be what the vendor currently ships out the door with their
  1130. # machine or put another way, the most popular os provided with the machine.
  1131.  
  1132. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1133. # "-sun"), then you have to tell the case statement up towards the top
  1134. # that MANUFACTURER isn't an operating system.  Otherwise, code above
  1135. # will signal an error saying that MANUFACTURER isn't an operating
  1136. # system, and we'll never get to this point.
  1137.  
  1138. case $basic_machine in
  1139.     *-acorn)
  1140.         os=-riscix1.2
  1141.         ;;
  1142.     arm*-rebel)
  1143.         os=-linux
  1144.         ;;
  1145.     arm*-semi)
  1146.         os=-aout
  1147.         ;;
  1148.         pdp11-*)
  1149.         os=-none
  1150.         ;;
  1151.     *-dec | vax-*)
  1152.         os=-ultrix4.2
  1153.         ;;
  1154.     m68*-apollo)
  1155.         os=-domain
  1156.         ;;
  1157.     i386-sun)
  1158.         os=-sunos4.0.2
  1159.         ;;
  1160.     m68000-sun)
  1161.         os=-sunos3
  1162.         # This also exists in the configure program, but was not the
  1163.         # default.
  1164.         # os=-sunos4
  1165.         ;;
  1166.     m68*-cisco)
  1167.         os=-aout
  1168.         ;;
  1169.     mips*-cisco)
  1170.         os=-elf
  1171.         ;;
  1172.     mips*-*)
  1173.         os=-elf
  1174.         ;;
  1175.     *-tti)    # must be before sparc entry or we get the wrong os.
  1176.         os=-sysv3
  1177.         ;;
  1178.     sparc-* | *-sun)
  1179.         os=-sunos4.1.1
  1180.         ;;
  1181.     *-be)
  1182.         os=-beos
  1183.         ;;
  1184.     *-ibm)
  1185.         os=-aix
  1186.         ;;
  1187.     *-wec)
  1188.         os=-proelf
  1189.         ;;
  1190.     *-winbond)
  1191.         os=-proelf
  1192.         ;;
  1193.     *-oki)
  1194.         os=-proelf
  1195.         ;;
  1196.     *-hp)
  1197.         os=-hpux
  1198.         ;;
  1199.     *-hitachi)
  1200.         os=-hiux
  1201.         ;;
  1202.     i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1203.         os=-sysv
  1204.         ;;
  1205.     *-cbm)
  1206.         os=-amigaos
  1207.         ;;
  1208.     *-dg)
  1209.         os=-dgux
  1210.         ;;
  1211.     *-dolphin)
  1212.         os=-sysv3
  1213.         ;;
  1214.     m68k-ccur)
  1215.         os=-rtu
  1216.         ;;
  1217.     m88k-omron*)
  1218.         os=-luna
  1219.         ;;
  1220.     *-next )
  1221.         os=-nextstep
  1222.         ;;
  1223.     *-sequent)
  1224.         os=-ptx
  1225.         ;;
  1226.     *-crds)
  1227.         os=-unos
  1228.         ;;
  1229.     *-ns)
  1230.         os=-genix
  1231.         ;;
  1232.     i370-*)
  1233.         os=-mvs
  1234.         ;;
  1235.     *-next)
  1236.         os=-nextstep3
  1237.         ;;
  1238.         *-gould)
  1239.         os=-sysv
  1240.         ;;
  1241.         *-highlevel)
  1242.         os=-bsd
  1243.         ;;
  1244.     *-encore)
  1245.         os=-bsd
  1246.         ;;
  1247.         *-sgi)
  1248.         os=-irix
  1249.         ;;
  1250.         *-siemens)
  1251.         os=-sysv4
  1252.         ;;
  1253.     *-masscomp)
  1254.         os=-rtu
  1255.         ;;
  1256.     f30[01]-fujitsu | f700-fujitsu)
  1257.         os=-uxpv
  1258.         ;;
  1259.     *-rom68k)
  1260.         os=-coff
  1261.         ;;
  1262.     *-*bug)
  1263.         os=-coff
  1264.         ;;
  1265.     *-apple)
  1266.         os=-macos
  1267.         ;;
  1268.     *-atari*)
  1269.         os=-mint
  1270.         ;;
  1271.     *)
  1272.         os=-none
  1273.         ;;
  1274. esac
  1275. fi
  1276.  
  1277. # Here we handle the case where we know the os, and the CPU type, but not the
  1278. # manufacturer.  We pick the logical manufacturer.
  1279. vendor=unknown
  1280. case $basic_machine in
  1281.     *-unknown)
  1282.         case $os in
  1283.             -riscix*)
  1284.                 vendor=acorn
  1285.                 ;;
  1286.             -sunos*)
  1287.                 vendor=sun
  1288.                 ;;
  1289.             -aix*)
  1290.                 vendor=ibm
  1291.                 ;;
  1292.             -beos*)
  1293.                 vendor=be
  1294.                 ;;
  1295.             -hpux*)
  1296.                 vendor=hp
  1297.                 ;;
  1298.             -mpeix*)
  1299.                 vendor=hp
  1300.                 ;;
  1301.             -hiux*)
  1302.                 vendor=hitachi
  1303.                 ;;
  1304.             -unos*)
  1305.                 vendor=crds
  1306.                 ;;
  1307.             -dgux*)
  1308.                 vendor=dg
  1309.                 ;;
  1310.             -luna*)
  1311.                 vendor=omron
  1312.                 ;;
  1313.             -genix*)
  1314.                 vendor=ns
  1315.                 ;;
  1316.             -mvs* | -opened*)
  1317.                 vendor=ibm
  1318.                 ;;
  1319.             -ptx*)
  1320.                 vendor=sequent
  1321.                 ;;
  1322.             -vxsim* | -vxworks*)
  1323.                 vendor=wrs
  1324.                 ;;
  1325.             -aux*)
  1326.                 vendor=apple
  1327.                 ;;
  1328.             -hms*)
  1329.                 vendor=hitachi
  1330.                 ;;
  1331.             -mpw* | -macos*)
  1332.                 vendor=apple
  1333.                 ;;
  1334.             -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1335.                 vendor=atari
  1336.                 ;;
  1337.         esac
  1338.         basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1339.         ;;
  1340. esac
  1341.  
  1342. echo $basic_machine$os
  1343. exit 0
  1344.  
  1345. # Local variables:
  1346. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1347. # time-stamp-start: "timestamp='"
  1348. # time-stamp-format: "%:y-%02m-%02d"
  1349. # time-stamp-end: "'"
  1350. # End:
  1351.